package com.ujiuye.service;


import com.ujiuye.dao.BookDao;
import com.ujiuye.pojo.Book;
import com.ujiuye.utils.PageTool;

import javax.servlet.annotation.WebServlet;
import java.util.List;

public class BookService {
    BookDao bd = new BookDao();
    public List<Book> lookAllBooks(String num) {

        return bd.lookAllBooks(num);
    }

    public boolean addBook(Book book) {
        return bd.addBook(book)>0;
    }

    public Book lookBookByBid(String bid) {
        return bd.lookBookByBid(bid);
    }

    public boolean upDateBook(Book book) {
        return bd.upDateBook(book)>0;
    }

    public boolean deleteBookByBid(String bid) {
        return bd.deleteBookByBid(bid)>0;
    }

    public int lookCounts() {
        return bd.lookCounts();
    }
}
